home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10084 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.4 KB  |  49 lines

  1. Newsgroups: comp.lang.c
  2. Path: news.sprintlink.net!news1!ind-003-236-135
  3. From: dlmiller@iquest.net (Doug Miller)
  4. Subject: Re: Beginner port question.
  5. X-Nntp-Posting-Host: ind-003-236-135.iquest.net
  6. Message-ID: <DoBB0B.LL7@iquest.net>
  7. Sender: news@iquest.net (News Admin)
  8. Organization: IQuest Network Services
  9. X-Newsreader: News Xpress Version 1.0 Beta #2.1
  10. References: <4ia10s$3de@verkko.uwasa.fi>
  11. Date: Fri, 15 Mar 1996 14:04:48 GMT
  12.  
  13. mkuljukk@walli.uwasa.fi wrote:
  14. +Xref: news1 comp.lang.c:70821
  15. +Path: news1!news.sprintlink.net!tank.news.pipex.net!pipex!dish.news.pipex.net!pipex!news00.sunet.se!sunic!news99.sunet.se!news.funet.fi!verkko.uwasa.fi!news
  16. +From: mkuljukk@walli.uwasa.fi
  17. +Newsgroups: comp.lang.c
  18. +Subject: Beginner port question.
  19. +Date: Thu, 14 Mar 1996 20:55:12 GMT
  20. +Organization: University of Vaasa, Finland
  21. +Lines: 22
  22. +Message-ID: <4ia10s$3de@verkko.uwasa.fi>
  23. +NNTP-Posting-Host: walli.uwasa.fi
  24. +X-Newsreader: Forte Agent .99b.112
  25. +
  26. + I am trying to make pc- speaker to beep by giving the port 97
  27. +value 79. According to my C tutorial, this should do it. It don't
  28. +however, so where is the problem?
  29. +______________________________________
  30. +
  31. +#include<stdio.h>
  32. +#include<conio.h>
  33. +void main (void)
  34. +{
  35. +int save;
  36. +int count=0;
  37. +save = inp(97);
  38. +outp(97,79);
  39. +while(count<10000);
  40. +outp(97,save);
  41. +}
  42. +--
  43. +Mikko Kuljukka
  44. +pitkÎŁkatu 46 b 27
  45. +65100 Vaasa
  46. +puh:961-3123492
  47. +
  48. Are the numbers 97 and 79 perhaps supposed to be hexadecimal constants?
  49.